Version 1.0.4
02OCT94

• Saves current settings (including Unzip folder) in “MAV Preferences” in the system Preference folder.
• Added GL time scale.
• Writes GIF89a comments to the console.
• GL PIC/PCX files with “.gif” extensions are treated as GIF files when reconciling script file references.  (Fixes realthng.gl.)
• Added ‘????’ and ‘PREF’ file references and icons to bundle.

Version 1.0.3
22AUG94

• ESC key now terminates display. 
• File’s Quit item is disabled whenever the console window is frontmost.
• Pressing the Option key while dismissing the frontmost window closes all the windows.
• Supports DL version 3 non-encrypted video-only files.
• Supports high-level Apple Events (needed for PowerMac version).
• TEXT directive word wraps using WINDOW parameters (based upon obsessed.gl). 
• fliread.c’s ProcessFrames () now checks the animation’s frame count (hothit.fli had a count of 0).
• fliread.c’s ProcessSS2 () tweaked.  Jupiter2.flc now plays cleanly; application now detects that movie.flc is corrupt.
• f_fly () corrected to handle negative steps (which caused obsessed.gl to loop indefinitely).
• Added _DEBUG GRASP directive (aka, f__debug ()) to allow script definition of runtime diagnostic flags (print-the-codes, quiet, and verbose). 

Version 1.0.2
19JUN94

• Corrected PCX decoding bugs that crept into version 1.0.1.  (Sigh.  It happens sometimes.)
• gl_readfiles () now prints a message to the console when it cannot properly decode an embedded image (e.g., babyplay.gl).
• stringtolabel,font,image,exec () now check that string tokens are actually passed.
• converttypes () changed to accommodate DATABEGIN statements without labels.
• printexec () changed to not assume that a token necessarily corresponds to a legal GRASP command.
• execfile () changed to support implicit GOSUBs (viz., label reference only) in GRASP scripts.  (Fixes em-spat.gl.)
• readimage () changed to zero PCX offsets; this allows f_position () to use xoff and yoff.
• POSITION directive implemented (deb.gl now scrolls).
• InitExec () changed to initialize more GL globals.  (Geez, I hate globals!)
• Almost all GRASP directives changed to accept wildcard arguments.
• Increased the maximum number of scripts from 6 to 16; now checks for overflow.
• Added recognition of file type 'FLIC' (used by Debabelizer).

Version 1.0.1
15MAY94

• Substantially changed and consolidated image scale dialog to permit runtime expansion and reduction of all animations and still images.  However, scaling simultaneously affects both animations and still images (i.e., there is only one scaling option, as opposed to two).
• “Play” in the File menu dynamically changed to “Display” for still images.
• Anti-aliased 4- and 8-bit deep color icons.  All Finder-related icons were tweaked.
• Memory is now purged and compacted after Help… and History… are invoked.
• About… now displays available memory (vice memory partition size).
• Placement of GL text displaced by current font’s character height.
• Reset installed colormap in TerminateExec () (now deb.gl’s colormap is always installed).

Version 1.0.1ß5
06MAY94

• Added “Unzip File…” to Options menu.  (After all, all the pieces were already in place!  :-)
• Now uses a “fall through” file type determination strategy to guarantee that .zip archives are examined for embedded animation files.
• Memory is now purged and compacted when an animation window is closed.
• Changed “Unzip Files to…” menu item to “Select Unzip Folder…”.  Changed button label in Select Folder dialog from “Set Current Folder” to “Select Currently Open Folder”.
• Corrected FLI_SS2 decoding (dancer.flc now plays correctly).  fli_CPUExecute changed to always reset the window size before playing.  (Inherited from 1.0).
• Added recognition of file type 'DLdl' (used by GraphicConverter).

Version 1.0.1ß4
27APR94

• unzip logic updated to search for FLC files within zip archives. 

Version 1.0.1ß3
19APR94

• Converted FLC timescale into FLI jiffies (viz., 1/70 second).  Compensated for bad FLI_BRUN chunk sizes (most other viewers never use this value) and implemented runtime delay for empty timing frames. 

Version 1.0.1ß2
16APR94

• Converted to Symantec THINK C 7 and compiled with various optimization options.  The code is smaller and might even be faster(!).
• Corrected FLI_COLOR256 decoding logic.  Separated processing of FLI_LC and FLI_BRUN chunks to accommodate FLC changes to FLI_BRUN packets.  Corrected logic to skip unknown chunks.  emconj, vikball, anmmorph, audworks, heart, neuron.flc and t2_morph.fli now display properly.  However, FLI_MINI images are only stored if they are full-sized images.

Version 1.0.1ß1
12MAR94

• Generalized image explosion to apply to non-GL images.  As a consequence, added Explode Images… option, eliminated Expand Images in FLI/DL Settings dialog, and changed explodeImage () to handle the case when bytes per scan line is different from image width.
• Because it appears that PCX images are already long word aligned, readpcximage () was changed to accommodate byte-padded images when the width isn’t divisible by four.  Additionally, XCreateImage () no longer word aligns the image data, because memory could be corrupted when the word-aligned address was freed.  (Inherited from GLViewer 1.0.)
• Opens all dragged-and-dropped files (or until memory is exhausted).
• Corrected GIF decoding to accommodate 3-, 5-, 6-, and 7-bit deep images.  This also avoids over-writing memory.
• Increased maximum number of permissible GIF sub-images from 20 to 64 (based upon faerie.gif); now detects when the number of GIF sub-images exceeds this value (inherited from GLViewer 1.1).  Uses specified x- and y-offsets for GIF animations.
• Implemented plane decoding to avoid crashing on plane non-interleaved PCX images.  Corrected color map decoding for version 2 PCX files.  (Inherited from GLViewer 1.0.)
• Made filename extension matching case-insensitive.  (Inherited from 1.0ß2.)
• Installs different Apple Menu when displaying still images.
• f_databegin () now searches for matching DATAEND directive, while converttypes () now processes DATABEGIN directives (inherited from GLViewer 1.1.3).  (Now deb.gl “blinks.”)
• f_position (), f_text (), and f_mark () changed to accommodate wildcard arguments.  In resolvewild (), fixed stringtoimage () and stringtofont () calls (missing arguments).  In f_cload (), corrected ordering of resolvewild () calls.  f_text () changed to accept only one argument.  stringtoimage () now handles the wildcard character (‘@’).  (Inherited from GLViewer 1.0.)
• Increased number of clip registers from 16 to 32 (based upon obsessed.gl).

Version 1.0
12FEB94

• Added history menu item.
• Added search for files with extension “.flc”.
• Now decodes LC7 chunk for FLI/FLC files.  This allows MacAnim Viewer to correctly decode my sole example FLC file.
• Changed StopKey () to accept suspend and resume events.
• Deleted extraneous 'SIZE' 0 resource from project resource file.
• Eliminated YFLIPS () macro's off-by-one error.
• Corrected XCopyArea ()'s off-by-one error for the destination rectangle.  (Yep, ß10's correction was unnecessary  :-)
• Added byte-shift strategy to decode the FLI frame header magic number.  (This is probably unnecessary.)
• Added recognition of file type 'PCXx' (used by GraphicConverter).

Version 1.0ß11
21JAN94

• Optimized runtime image expansion and added support for expansion of FLI images.  For both DL and FLI files, this expansion occurs during playback and sacrifices performance for reduced memory consumption.
• Extended VIDEO command to accept an explicit display width and height if the specified mode is '!'.  This permits arbitrary FLI/FLC images to have an appropriately sized display window.
• Extended the CFADE, PFADE, and PUTUP commands to accept an optional width argument that is used for image expansion.  The variant forms of these commands are only used in FLI/DL scripts to specify run-time image expansion.
• Replaced FLI/DL diagonal fade with a snap fade.
• Limited image expansion to a maximum factor of eight.

Version 1.0ß10
16JAN94

• Changed DL color map normalization to normalize in HSL space.
• Corrected XCopyArea ()'s off-by-one error for the destination rectangle.
• Added image expansion for DL images.
• Implemented prepDelay () to compensate for execution delays.  Thus, animations should run closer to real-time; or, at least, they won't fall too far behind.
• Black background's size was expanded by a pixel to address an off-by-one error.
• Minimum and preferred memory sizes changed to 2048K.
• Replaced FLI/DL sparkle fade with a diagonal fade.
• Forced preload of unzip segment when GL files are played to reduce disk accesses during playback.
• Theater mode made the default.

Version 1.0ß9
10JAN94

• Added “theater” mode, where the images are displayed in the middle of the screen with a black background.
• Filename munging reduced to checking for a leading dash.
• picreg[0] freed whenever image display has terminated.

Version 1.0ß8
08JAN94

• On-line help added to Apple menu.
• unzip segment unloaded after an image window is closed.
• StopKey () now updates single images and title bars after an image window is dragged.  It is also more responsive to mouse and keyboard inputs.
• Implemented fade speeds.  In turn, fades are now more responsive to Command-. interrupts.  (Inherited from GL Viewer 1.0.)

Version 1.0ß7
19DEC93

• During playback, a “Command-period” cursor is now displayed and the close box is button-insensitive.
• macmalloc.c changed to purge and compact memory when memory allocation fails, followed by one more attempt to allocate memory.
• normalizeClut () changed to force the minimum intensity to 0.  Also, the option to rescale DL color maps is now accessible via the FLI/DL options dialog.
• DoMenu () changed to avoid dereferencing recently disposed window structures.
• GL font-related data structures now freed when a GL window is closed.
• Memory lossage eliminated when anim_readfiles () runs out of memory reading GL files.  Lossage also eliminated for Close All command and dl_readfiles ().
• Added recognition of file type 'FLI ' (used by GraphicConverter).
• Add black background window when displaying images to hide desktop corruption (-- “No, no, ignore the man behind the curtain!” said the Wizard).

Version 1.0ß6
10DEC93

• Eliminated memory lossage associated with closing multiple image windows.
• Source code attributions moved from the About dialog into a credits file.
• malloc (), calloc (), realloc (), and free () re-defined as macros that, one way or the other, invoke NewPtr (), NewPtrClear (), SetPtrSize (), and DisposPtr ().  This will help in the continuing quest to eliminate memory lossage.
• signal () appears to incorrectly restore the stack context, which in turn causes the signal handlers to free the “wrong” automatic variables.  As a workaround, such volatile variables were assigned to locally scoped static variables which are not on the stack.  However, I really should track down signal ()'s problem with restoring automatic variables.  Sigh.

Version 1.0ß5
28NOV93

• PCX decoding logic corrected to properly handle ZSoft version 3.0 PCX files with 256 VGA colors.  (Inherited from 1.0ß2.)  Also, file type 'PCX ' added to standard file dialog list.
• DL decoding logic changed to handle small (80 x 50) images.  (Inherited from GL Viewer 1.0.)
• Added unzipping logic.  However, only the first archive entry with a .gl, .fli, or .dl extension is examined.  In addition, users can specify the directory into which files are extracted (default: MacAnim's directory).
• Replaced FLI big endian conversion macros with routines; the macros sometimes erroneously returned negative values which caused spurious malloc () failures.  (Inherited from xflick.c.)
• Consolidated the common logic in the FLI in-memory and runtime decoding routines.
• Changed FLI runtime image expansion to update the colormap.  Unfortunately, this causes the display's colors to flash every time the colormap is updated. (Is this one of the reasons that A. P. Maika's FLI Player apparently creates in-memory pixmaps?)
• Corrected FLI decoding logic to properly handle changed colormaps.  A signed char was being assigned to a short as the number of colors to change; this resulted in a negative count and a subsequent memory overrun.  (Inherited from xflick.c, circa March 1991.)
• A stripped-down and selectable File menu is now active when a file is being displayed.  Its only entries are “Stop”, with the command key equivalent Command-. (period), and “Quit”, with the command key equivalent Command-Q. N.b.: clicking the animation window's go away box is equivalent to entering Command-. (period).
• FLI display implemented as a runtime expansion during playback.  However, the original implementation, full GL image expansion, is now selectable via the FLI/DL Settings dialog to support image loop diagnostics and conversion to GL files.
• InitCursor () pre-emptively invoked during event processing to protect against non-arrow cursors caused by MacAnim being swapped back in.
• Low memory alert text changed to recommend either closing other animation windows, or quitting, and then trying again, depending upon whether more than one animation window is opened.
• Animation window now blanked out after a file has finished displaying.
• The animation window is not displayed if there is insufficient memory to decode the animation file.
• The console window is no longer initially displayed on program startup.
• Decodes GIF images with bits per pixel == 1 as bitmaps instead of 8-bit deep pixmaps.  This entailed revamping gifread.c's PUTIPIXEL () and PUTPIXEL () macros, doing some legwork in myreadimage (), and changing imageUtils.c' makeImage () to honor numColorBits.  The final result is lower image memory consumption.

Version 1.0ß4
14NOV93

• DL decoding logic made a bit more rigorous in checking for non-DL files. However, because DL files do not explicitly contain magic numbers, there is a possibility that some binary files will still be inadvertently decoded.  :-(
• error () now issues alerts and calls Failure () instead of terminating the program.
• Added progress indicators when animation and GIF files are being read and when animation files are being written.
• Allows more than one animation file to be open simutaneously, given sufficient available memory.  Close All added to the File menu.
• Handles out of memory errors more gracefully.
• Activated Edit menu items when the console is frontmost.
• Now allows script selection for GL archives with more than one script.
• Implemented grayscale video C preamble script to set the palette before executing the primary archive script.
• Added memory statistics to About dialog.
• Console window created, hidden, and added to Windows menu.  Windows menu selection implemented.
• Stack is no longer corrupted when an arbitrary file is inadvertantly opened as an animation file.
• Animation windows’ window type made macUIKind to disambiguate these windows from the console window.  Previously, after a message was issued to stdout or stderr, the console window's refcon was dereferenced as an AnimPtr, which in turn would cause the application to crash.
• FLI image decoding patch installed -- corrects decoding problems with raytraced examples.
• FLI/DL speed options separated from debugging options.
• FLI looping made a menu-accessible user option.
• FLI and DL scripts are created prior to playing to accommodate changes in the animation speeds or the FLI looping option.

Version 1.0ß3
31OCT93

(BTW, the reason that it took me more than a month to create this version is because I took a three week vacation, one week in Hawaii and two weeks in Australia.  ...Try it -- you'll like it!  :-)

• A preliminary Macintosh UI implemented.
• 640 x 200 1-bit deep video C images rescaled to 320 x 200 are now displayed as grayscale images.
• anim_close () now invokes InitExec () to re-initialize exec.c's globals.  This eliminates the possibility of dereferencing dangling image register pointers. (I despise global variables!)
• To eliminate dangling color table handles, xlib.c was changed to simply copy color tables into the window's.  Also, most of xlib.c's globals were eliminated in preparation for the re-entrant display of files on a per window basis.
• StopKey () now flushes extraneous characters to guarentee that Command-. will never be blocked.
• Signalling mechanism implemented to support user abort/cancel operations. Although this implementation is Macintosh-specific, the routines in signal.c could probably be replaced with routines that employ a setjmp () stack, where CatchSignal () and FreeSignal () respectively push and pop an env stack.
• Properly restored the color map after display or before exiting.
• Implemented drag and drop of files, where MacAnim automatically determines the animation format.

Version 1.0ß2
24SEP93

• Added file format matching heuristic: first file type matching, then file extension matching, followed by brute force examine-the-bits.
• Changed Options dialog to accept a DL time scale.
• No longer requires a 68881 FPU (-- this application doesn't perform much floating-point calculations anyway).
• Now opens and displays GIF and PCX/PIC files.
• Corrected GIF decoding routines to correctly handle interleaved images.
• Added DL decoding routines.
• Added GL output capability as groundwork for DL/FLI->GL conversion.  This is also useful for converting video C (1-bit 640x200) data.  However, the UI needs to be overhauled to permit selection of this feature.
• Added color icon.

Version 1.0ß1
ddSEP93

• Added FLI decoding routines and changed Options dialog to accept an FLI time scale.

GL Viewer 1.1 History

Version 1.1.3
11SEP93

• exec.c:execfile () changed to print a bogus token via printexec () instead of assuming that the token is a string.  Viz., if the token is an integer, the diagnostic print would cause a bus error.  (Inherited from 1.0.)
• readfiles.c:converttypes () changed to ignore databegin directives. exec.c:f_databegin (), f_dataend (), f_data (), resolvewild () also changed to correctly implement data-related directives.  (Inherited from 1.0.)

Version 1.1.2
09SEP93

• Hacked XExit () to refresh the main device's color table.  This helps restore the appearance of the screen.  It ain't perfect, but it's a lot better than before.  (We'll keep sluggin' at it!)  (Inherited from 1.1.)

Version 1.1.1
06SEP93

• Changed GIF reader to correctly declare and invoke readimage () when it encounters a file with the extension “.gif” that isn't a GIF file.  This eliminates one crash condition: casting a “short” address.  (Introduced in 1.1.)
• f_setrgb () corrected to check for a currently installed color map before invoking XStoreColors ().  If one doesn't exist, it uses the color map from the last PLOADed image.  This eliminates another crash condition: deferencing a NIL color map handle in XStoreColors ().  (Inherited from 1.0.)
• Implemented a GL Viewer-specific assert () macro for debugging.
• parser.c:sowsanl () changed so that scripts whose last directive is a comment statement without a newline won't cause memory overreads, which in turn cause garbage to be parsed, stored, and potentially executed.  (Inherited from 1.0.)
• exec.c:installcmap () changed to issue an error message if f_palette () attempts to install a non-existent color map.  xlib.c:XCopyArea () also changed to avoid using a NIL CTabHandle.  (Inherited from 1.0.)
• Corrected readimage () plane consolidation for bits per plane == 1 and number of planes == 4 to use u_long offsets instead of ints.  (Introduced in 1.1.)
• Corrected f_cycle () to compute end after start and number have been popped off of the execution stack, otherwise a bogus terminal for-loop value is arbitrary computed which, in turn, will cause catastrophic memory overwrites.  (Inherited from 1.0.)
• Corrected f_gosub () and f_return () to use ipstackptr instead of loopstackptr. This should make gosub's work even if executed within a mark/loop context. (Inherited from 1.0.)
• Implemented image loop, which is selected via the options dialog.  Command-. continues normal execution, click displays next image, option-click displays previous image.  On extended keyboards, you can also use the home/page/arrow keys to navigate through the images.  This is useful to see if GL Viewer is displaying all images specified in a script or is having problems decoding images.
• Implemented XDrawLine () and XDrawPoint ().  However, they haven't been tested.
• SystemTask () now called in exitcheck ().
• readimage () and readpcximage () changed to call CheckColorMap (), which in turn prevents colormaps from being entirely black (-- a grayscale is used instead). (Inherited from 1.0.)
• Added support for text images.
• Extraneous directive parameters are now ignored.

Version 1.1
28AUG93

• Enhancement of GL View 1.0 copyright (c) 1991 by Patrick J. Naughton.
• Converted to THINK C 5.0.x from MPW.  Among other things, this entailed eliminating the assumption that sizeof (int) == sizeof (long), and explicitly including <stdlib.h> so that malloc () did not “return” short pointers or allocate less space than intended.
• 640 x 200 1-bit deep video C images are now rescaled to 640 x 400 or 320 x 200. The bits for these images are also complemented to permit proper viewing when the screen's depth is 1.
• Because the original GIF decoder did not work even in original GL View 1.0 application, I've completely replaced it with one adapted from the Net.
• Various GL directives were tweaked, based upon the GL documentation and actual files, so that they accept the appropriate number of arguments, instead of aborting the program.  In addition, illegal directives are now displayed to the console.
• Implemented diagonal fades.
• XCopyArea () now clips based upon the image's dimensions.  Also, color maps are not used for 1-bit deep images to eliminate inaccurate color rendering.
• Made the runtime executive more bullet-proof by validating picture, clip, and font registers.  Also, asserts have been sprinkled liberally through the code.
• glview.c:readdirectory () now attempts to confirm that the specified input file is actually a GL file.  However, a more rigorous check needs to be implemented (viz., checking the internal integrity of the directory entries against the physical length of the input file).
• The number of picture registers was increased to 32.  (I encountered a library that assumed 17 registers.  Remember: the picture registers are zero-count based.)
• Corrected xlib.c:isPressed () and Keypress () so they actually work.
• You can now terminate execution within long fades and when images are initially being read.  Also, when waitkey () is executing, pressing Command-. will stop execution.
• exec.c:displaystring () overhauled to render via DrawText ().  (This is an improvement over displaying nothing!)
• Resource file stripped of unreferenced resources.
• Options dialog implemented to replace CLI.  This is invoked by holding down the Command key when starting the application.
• Added video mode '?', which sets the size of the output window to the maximum of all the image dimensions.  However, any previous video directive that defines a larger window size will prevail.
• Program now aborts if no executable script (“.txt”) file is found.